Introduction to CSS
CSS (Cascading Style Sheets) is a language used to define the appearance of HTML documents. It allows separating the structure of the content from its presentation, such as colors, fonts, margins, and more.
Basic CSS Example
Here is an example of basic CSS code:
<style>
body {
background-color: #f0f0f0;
color: #333;
}
h1 {
color: #d6336c;
}
p {
font-size: 1.2em;
line-height: 1.6;
}
</style>
Code Explanation:
This CSS code modifies the style of the HTML document:
- <style>: Tag where CSS is defined within the HTML document.
- body: Applies styles to the body of the page, such as background color and text color.
- h1: Changes the color of the main header (h1).
- p: Modifies the font size and line spacing of paragraphs.
Browser Result
When this code is viewed in a browser, the result will be:

Useful Links
For more details about CSS features, you can visit the W3C CSS website.
Additionally, you might find the CSS Tutorial on W3Schools helpful.